﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace BlueWind.Mediator.ServiceContracts.Interfaces
{
    public interface IColleague
    {
        event ReceivedEventHandler ReceivedHandler;

        [DataMember]
        List<String> ChatRoomList
        {
            [OperationContract]
            get;
            [OperationContract]
            set;
        }

        BwConnection Connection { get; }

        Boolean IsAuthenticated { get; }

        IDomainRepository Repository { get; }

        BwUser User
        {
            [OperationContract]
            get;
        }

        void CreateRoom(string from, string to);

        [OperationContract]
        void DestroyInstance();

        [OperationContract]
        Boolean Login(String userName, String password);

        [OperationContract(IsOneWay = true)]
        void Receive(String from, String room, BwMessage message, MessageType messageType);

        void Register(String from, String room, Boolean isClassroom);

        void Register(String from, String to);

        void Send(String room, BwMessage message, MessageType messageType);

        void UnRegister(string from, string to);

        void UnRegister(string room);
    }
}